package org.cx.comparator.springtest.provider;

import org.cx.comparator.annotations.IComparatorProvider;
import org.cx.comparator.map.ComparatorFieldMapping;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Set;

/**
 * <p>  </p>
 *
 * <pre> Created: 2019/12/5 16:46 </pre>
 *
 * @author hlu
 * @version 1.0
 */
@Component
public class MyComparatorProvider2 implements IComparatorProvider {
    @Override
    public Set<ComparatorFieldMapping> provide(Method method) {
        Set<ComparatorFieldMapping> comparatorFieldMappings = new HashSet<>();
        comparatorFieldMappings.add(new ComparatorFieldMapping("id","id"));
        return comparatorFieldMappings;
    }

    @Override
    public boolean byDefault(Method method) {
        return false;
    }
}
